//
//  TaskDetailsViewController.h
//  TableViewApp
//
//  Created by Dmitriy on 05.06.13.
//  Copyright (c) 2013 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "Task.h"

@interface TaskDetailsViewController : UIViewController <UITextFieldDelegate>
{
    BOOL taskIsNew;
    NSDate *taskDate;
    UIDatePicker* taskDatePicker;
    IBOutlet UITextField *taskNameField;
    IBOutlet UITextField *taskDateField;
    IBOutlet UISwitch *taskNotificationSwitch;
    IBOutlet UIBarButtonItem *changeStateButton;
    IBOutlet UIScrollView *detailsScrollView;
    IBOutlet UITextField *taskNotificationTime;
    IBOutlet UILabel *taskNotificationTimeCaption;
    Task* taskForEditing;

}
-(void)setEditingTask:(Task*)task;
-(IBAction)editTask:(id)sender;
-(IBAction)saveTask:(id)sender;
-(void)fillFields;
-(void) switchFields:(BOOL)state;
-(void) changeBarButton:(id)button
               WithText:(NSString*)text
           WithSelector:(SEL)selector;
- (IBAction)dateIsEntered:(id)sender;

@end
